From 0da077938843a117092664e3dcec1e449d137d4d Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 3 Jul 2007 22:07:09 +0000 Subject: [PATCH] Write header block of zero waypoints even when we have zero waypoints. --- gpsbabel/lowranceusr.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/gpsbabel/lowranceusr.c b/gpsbabel/lowranceusr.c index 3d867d22c..0664cdd56 100644 --- a/gpsbabel/lowranceusr.c +++ b/gpsbabel/lowranceusr.c @@ -956,19 +956,17 @@ data_write(void) if (global_opts.debug_level >= 1) printf("LOWRANCE data_write: Num waypoints = %d\n", NumWaypoints); - if (NumWaypoints) { - if (writeasicons) { - short zero = 0; - my_fwrite2(&zero, file_out); - } else { - my_fwrite2(&NumWaypoints, file_out); - waypt_disp_all(lowranceusr_waypt_pr); - } - } - - /* Route support added 6/21/05 */ - NumRoutes = route_count(); - my_fwrite2(&NumRoutes, file_out); + if (writeasicons) { + short zero = 0; + my_fwrite2(&zero, file_out); + } else { + my_fwrite2(&NumWaypoints, file_out); + waypt_disp_all(lowranceusr_waypt_pr); + } + + /* Route support added 6/21/05 */ + NumRoutes = route_count(); + my_fwrite2(&NumRoutes, file_out); if (global_opts.debug_level >= 1) printf("LOWRANCE data_write: Num routes = %d\n", NumRoutes); -- 2.30.2